package com.lz.kunkun.messageservice.util;

import javax.servlet.http.HttpServletResponse;

public class ApplicationException extends RuntimeException{
	/**
	 * 应用程序业务模块执行中出现错误
	 * 比如调用方法失败。该异常信息会以400错误码返回给客户端/浏览器
	 * 
	 * @author  姓名 工号
	 * @version  [版本号, 2017年9月29日]
	 * @see  [相关类/方法]
	 * @since  [产品/模块版本]
	 */
	private int httpStatusCode = HttpServletResponse.SC_BAD_REQUEST;
		
	public ApplicationException(String message) {
		super(message);
	}
		
	public ApplicationException(int statusCode, String message) {
		super(message);
		httpStatusCode = statusCode;
	}

	/**
	 * 获取 httpStatusCode
	 * @return 返回 httpStatusCode
	 */
	public int getHttpStatusCode() {
		return httpStatusCode;
	}

}
